//===----------------------------------------------------------------------===//
//
// This source file is part of the Soto for AWS open source project
//
// Copyright (c) 2017-2024 the Soto project authors
// Licensed under Apache License v2.0
//
// See LICENSE.txt for license information
// See CONTRIBUTORS.txt for the list of Soto project authors
//
// SPDX-License-Identifier: Apache-2.0
//
//===----------------------------------------------------------------------===//

// THIS FILE IS AUTOMATICALLY GENERATED by https://github.com/soto-project/soto-codegenerator.
// DO NOT EDIT.

#if canImport(FoundationEssentials)
import FoundationEssentials
#else
import Foundation
#endif
@_exported import SotoCore

/// Service object for interacting with AWS TrustedAdvisor service.
///
/// TrustedAdvisor Public API
public struct TrustedAdvisor: AWSService {
    // MARK: Member variables

    /// Client used for communication with AWS
    public let client: AWSClient
    /// Service configuration
    public let config: AWSServiceConfig

    // MARK: Initialization

    /// Initialize the TrustedAdvisor client
    /// - parameters:
    ///     - client: AWSClient used to process requests
    ///     - region: Region of server you want to communicate with. This will override the partition parameter.
    ///     - partition: AWS partition where service resides, standard (.aws), china (.awscn), government (.awsusgov).
    ///     - endpoint: Custom endpoint URL to use instead of standard AWS servers
    ///     - middleware: Middleware chain used to edit requests before they are sent and responses before they are decoded 
    ///     - timeout: Timeout value for HTTP requests
    ///     - byteBufferAllocator: Allocator for ByteBuffers
    ///     - options: Service options
    public init(
        client: AWSClient,
        region: SotoCore.Region? = nil,
        partition: AWSPartition = .aws,
        endpoint: String? = nil,
        middleware: AWSMiddlewareProtocol? = nil,
        timeout: TimeAmount? = nil,
        byteBufferAllocator: ByteBufferAllocator = ByteBufferAllocator(),
        options: AWSServiceConfig.Options = []
    ) {
        self.client = client
        self.config = AWSServiceConfig(
            region: region,
            partition: region?.partition ?? partition,
            serviceName: "TrustedAdvisor",
            serviceIdentifier: "trustedadvisor",
            serviceProtocol: .restjson,
            apiVersion: "2022-09-15",
            endpoint: endpoint,
            serviceEndpoints: Self.serviceEndpoints,
            errorType: TrustedAdvisorErrorType.self,
            middleware: middleware,
            timeout: timeout,
            byteBufferAllocator: byteBufferAllocator,
            options: options
        )
    }


    /// custom endpoints for regions
    static var serviceEndpoints: [String: String] {[
        "fips-us-east-1": "trustedadvisor-fips.us-east-1.api.aws",
        "fips-us-east-2": "trustedadvisor-fips.us-east-2.api.aws",
        "fips-us-west-2": "trustedadvisor-fips.us-west-2.api.aws"
    ]}



    // MARK: API Calls

    /// Update one or more exclusion status for a list of recommendation resources
    @Sendable
    @inlinable
    public func batchUpdateRecommendationResourceExclusion(_ input: BatchUpdateRecommendationResourceExclusionRequest, logger: Logger = AWSClient.loggingDisabled) async throws -> BatchUpdateRecommendationResourceExclusionResponse {
        try await self.client.execute(
            operation: "BatchUpdateRecommendationResourceExclusion", 
            path: "/v1/batch-update-recommendation-resource-exclusion", 
            httpMethod: .PUT, 
            serviceConfig: self.config, 
            input: input, 
            logger: logger
        )
    }
    /// Update one or more exclusion status for a list of recommendation resources
    ///
    /// Parameters:
    ///   - recommendationResourceExclusions: A list of recommendation resource ARNs and exclusion status to update
    ///   - logger: Logger use during operation
    @inlinable
    public func batchUpdateRecommendationResourceExclusion(
        recommendationResourceExclusions: [RecommendationResourceExclusion],
        logger: Logger = AWSClient.loggingDisabled        
    ) async throws -> BatchUpdateRecommendationResourceExclusionResponse {
        let input = BatchUpdateRecommendationResourceExclusionRequest(
            recommendationResourceExclusions: recommendationResourceExclusions
        )
        return try await self.batchUpdateRecommendationResourceExclusion(input, logger: logger)
    }

    /// Get a specific recommendation within an AWS Organizations organization. This API supports only prioritized recommendations.
    @Sendable
    @inlinable
    public func getOrganizationRecommendation(_ input: GetOrganizationRecommendationRequest, logger: Logger = AWSClient.loggingDisabled) async throws -> GetOrganizationRecommendationResponse {
        try await self.client.execute(
            operation: "GetOrganizationRecommendation", 
            path: "/v1/organization-recommendations/{organizationRecommendationIdentifier}", 
            httpMethod: .GET, 
            serviceConfig: self.config, 
            input: input, 
            logger: logger
        )
    }
    /// Get a specific recommendation within an AWS Organizations organization. This API supports only prioritized recommendations.
    ///
    /// Parameters:
    ///   - organizationRecommendationIdentifier: The Recommendation identifier
    ///   - logger: Logger use during operation
    @inlinable
    public func getOrganizationRecommendation(
        organizationRecommendationIdentifier: String,
        logger: Logger = AWSClient.loggingDisabled        
    ) async throws -> GetOrganizationRecommendationResponse {
        let input = GetOrganizationRecommendationRequest(
            organizationRecommendationIdentifier: organizationRecommendationIdentifier
        )
        return try await self.getOrganizationRecommendation(input, logger: logger)
    }

    /// Get a specific Recommendation
    @Sendable
    @inlinable
    public func getRecommendation(_ input: GetRecommendationRequest, logger: Logger = AWSClient.loggingDisabled) async throws -> GetRecommendationResponse {
        try await self.client.execute(
            operation: "GetRecommendation", 
            path: "/v1/recommendations/{recommendationIdentifier}", 
            httpMethod: .GET, 
            serviceConfig: self.config, 
            input: input, 
            logger: logger
        )
    }
    /// Get a specific Recommendation
    ///
    /// Parameters:
    ///   - recommendationIdentifier: The Recommendation identifier
    ///   - logger: Logger use during operation
    @inlinable
    public func getRecommendation(
        recommendationIdentifier: String,
        logger: Logger = AWSClient.loggingDisabled        
    ) async throws -> GetRecommendationResponse {
        let input = GetRecommendationRequest(
            recommendationIdentifier: recommendationIdentifier
        )
        return try await self.getRecommendation(input, logger: logger)
    }

    /// List a filterable set of Checks
    @Sendable
    @inlinable
    public func listChecks(_ input: ListChecksRequest, logger: Logger = AWSClient.loggingDisabled) async throws -> ListChecksResponse {
        try await self.client.execute(
            operation: "ListChecks", 
            path: "/v1/checks", 
            httpMethod: .GET, 
            serviceConfig: self.config, 
            input: input, 
            logger: logger
        )
    }
    /// List a filterable set of Checks
    ///
    /// Parameters:
    ///   - awsService: The aws service associated with the check
    ///   - language: The ISO 639-1 code for the language that you want your checks to appear in.
    ///   - maxResults: The maximum number of results to return per page.
    ///   - nextToken: The token for the next set of results. Use the value returned in the previous response in the next request to retrieve the next set of results.
    ///   - pillar: The pillar of the check
    ///   - source: The source of the check
    ///   - logger: Logger use during operation
    @inlinable
    public func listChecks(
        awsService: String? = nil,
        language: RecommendationLanguage? = nil,
        maxResults: Int? = nil,
        nextToken: String? = nil,
        pillar: RecommendationPillar? = nil,
        source: RecommendationSource? = nil,
        logger: Logger = AWSClient.loggingDisabled        
    ) async throws -> ListChecksResponse {
        let input = ListChecksRequest(
            awsService: awsService, 
            language: language, 
            maxResults: maxResults, 
            nextToken: nextToken, 
            pillar: pillar, 
            source: source
        )
        return try await self.listChecks(input, logger: logger)
    }

    /// Lists the accounts that own the resources for an organization aggregate recommendation. This API only supports prioritized recommendations.
    @Sendable
    @inlinable
    public func listOrganizationRecommendationAccounts(_ input: ListOrganizationRecommendationAccountsRequest, logger: Logger = AWSClient.loggingDisabled) async throws -> ListOrganizationRecommendationAccountsResponse {
        try await self.client.execute(
            operation: "ListOrganizationRecommendationAccounts", 
            path: "/v1/organization-recommendations/{organizationRecommendationIdentifier}/accounts", 
            httpMethod: .GET, 
            serviceConfig: self.config, 
            input: input, 
            logger: logger
        )
    }
    /// Lists the accounts that own the resources for an organization aggregate recommendation. This API only supports prioritized recommendations.
    ///
    /// Parameters:
    ///   - affectedAccountId: An account affected by this organization recommendation
    ///   - maxResults: The maximum number of results to return per page.
    ///   - nextToken: The token for the next set of results. Use the value returned in the previous response in the next request to retrieve the next set of results.
    ///   - organizationRecommendationIdentifier: The Recommendation identifier
    ///   - logger: Logger use during operation
    @inlinable
    public func listOrganizationRecommendationAccounts(
        affectedAccountId: String? = nil,
        maxResults: Int? = nil,
        nextToken: String? = nil,
        organizationRecommendationIdentifier: String,
        logger: Logger = AWSClient.loggingDisabled        
    ) async throws -> ListOrganizationRecommendationAccountsResponse {
        let input = ListOrganizationRecommendationAccountsRequest(
            affectedAccountId: affectedAccountId, 
            maxResults: maxResults, 
            nextToken: nextToken, 
            organizationRecommendationIdentifier: organizationRecommendationIdentifier
        )
        return try await self.listOrganizationRecommendationAccounts(input, logger: logger)
    }

    /// List Resources of a Recommendation within an Organization. This API only supports prioritized recommendations.
    @Sendable
    @inlinable
    public func listOrganizationRecommendationResources(_ input: ListOrganizationRecommendationResourcesRequest, logger: Logger = AWSClient.loggingDisabled) async throws -> ListOrganizationRecommendationResourcesResponse {
        try await self.client.execute(
            operation: "ListOrganizationRecommendationResources", 
            path: "/v1/organization-recommendations/{organizationRecommendationIdentifier}/resources", 
            httpMethod: .GET, 
            serviceConfig: self.config, 
            input: input, 
            logger: logger
        )
    }
    /// List Resources of a Recommendation within an Organization. This API only supports prioritized recommendations.
    ///
    /// Parameters:
    ///   - affectedAccountId: An account affected by this organization recommendation
    ///   - exclusionStatus: The exclusion status of the resource
    ///   - maxResults: The maximum number of results to return per page.
    ///   - nextToken: The token for the next set of results. Use the value returned in the previous response in the next request to retrieve the next set of results.
    ///   - organizationRecommendationIdentifier: The AWS Organization organization's Recommendation identifier
    ///   - regionCode: The AWS Region code of the resource
    ///   - status: The status of the resource
    ///   - logger: Logger use during operation
    @inlinable
    public func listOrganizationRecommendationResources(
        affectedAccountId: String? = nil,
        exclusionStatus: ExclusionStatus? = nil,
        maxResults: Int? = nil,
        nextToken: String? = nil,
        organizationRecommendationIdentifier: String,
        regionCode: String? = nil,
        status: ResourceStatus? = nil,
        logger: Logger = AWSClient.loggingDisabled        
    ) async throws -> ListOrganizationRecommendationResourcesResponse {
        let input = ListOrganizationRecommendationResourcesRequest(
            affectedAccountId: affectedAccountId, 
            exclusionStatus: exclusionStatus, 
            maxResults: maxResults, 
            nextToken: nextToken, 
            organizationRecommendationIdentifier: organizationRecommendationIdentifier, 
            regionCode: regionCode, 
            status: status
        )
        return try await self.listOrganizationRecommendationResources(input, logger: logger)
    }

    /// List a filterable set of Recommendations within an Organization. This API only supports prioritized recommendations.
    @Sendable
    @inlinable
    public func listOrganizationRecommendations(_ input: ListOrganizationRecommendationsRequest, logger: Logger = AWSClient.loggingDisabled) async throws -> ListOrganizationRecommendationsResponse {
        try await self.client.execute(
            operation: "ListOrganizationRecommendations", 
            path: "/v1/organization-recommendations", 
            httpMethod: .GET, 
            serviceConfig: self.config, 
            input: input, 
            logger: logger
        )
    }
    /// List a filterable set of Recommendations within an Organization. This API only supports prioritized recommendations.
    ///
    /// Parameters:
    ///   - afterLastUpdatedAt: After the last update of the Recommendation
    ///   - awsService: The aws service associated with the Recommendation
    ///   - beforeLastUpdatedAt: Before the last update of the Recommendation
    ///   - checkIdentifier: The check identifier of the Recommendation
    ///   - maxResults: The maximum number of results to return per page.
    ///   - nextToken: The token for the next set of results. Use the value returned in the previous response in the next request to retrieve the next set of results.
    ///   - pillar: The pillar of the Recommendation
    ///   - source: The source of the Recommendation
    ///   - status: The status of the Recommendation
    ///   - type: The type of the Recommendation
    ///   - logger: Logger use during operation
    @inlinable
    public func listOrganizationRecommendations(
        afterLastUpdatedAt: Date? = nil,
        awsService: String? = nil,
        beforeLastUpdatedAt: Date? = nil,
        checkIdentifier: String? = nil,
        maxResults: Int? = nil,
        nextToken: String? = nil,
        pillar: RecommendationPillar? = nil,
        source: RecommendationSource? = nil,
        status: RecommendationStatus? = nil,
        type: RecommendationType? = nil,
        logger: Logger = AWSClient.loggingDisabled        
    ) async throws -> ListOrganizationRecommendationsResponse {
        let input = ListOrganizationRecommendationsRequest(
            afterLastUpdatedAt: afterLastUpdatedAt, 
            awsService: awsService, 
            beforeLastUpdatedAt: beforeLastUpdatedAt, 
            checkIdentifier: checkIdentifier, 
            maxResults: maxResults, 
            nextToken: nextToken, 
            pillar: pillar, 
            source: source, 
            status: status, 
            type: type
        )
        return try await self.listOrganizationRecommendations(input, logger: logger)
    }

    /// List Resources of a Recommendation
    @Sendable
    @inlinable
    public func listRecommendationResources(_ input: ListRecommendationResourcesRequest, logger: Logger = AWSClient.loggingDisabled) async throws -> ListRecommendationResourcesResponse {
        try await self.client.execute(
            operation: "ListRecommendationResources", 
            path: "/v1/recommendations/{recommendationIdentifier}/resources", 
            httpMethod: .GET, 
            serviceConfig: self.config, 
            input: input, 
            logger: logger
        )
    }
    /// List Resources of a Recommendation
    ///
    /// Parameters:
    ///   - exclusionStatus: The exclusion status of the resource
    ///   - maxResults: The maximum number of results to return per page.
    ///   - nextToken: The token for the next set of results. Use the value returned in the previous response in the next request to retrieve the next set of results.
    ///   - recommendationIdentifier: The Recommendation identifier
    ///   - regionCode: The AWS Region code of the resource
    ///   - status: The status of the resource
    ///   - logger: Logger use during operation
    @inlinable
    public func listRecommendationResources(
        exclusionStatus: ExclusionStatus? = nil,
        maxResults: Int? = nil,
        nextToken: String? = nil,
        recommendationIdentifier: String,
        regionCode: String? = nil,
        status: ResourceStatus? = nil,
        logger: Logger = AWSClient.loggingDisabled        
    ) async throws -> ListRecommendationResourcesResponse {
        let input = ListRecommendationResourcesRequest(
            exclusionStatus: exclusionStatus, 
            maxResults: maxResults, 
            nextToken: nextToken, 
            recommendationIdentifier: recommendationIdentifier, 
            regionCode: regionCode, 
            status: status
        )
        return try await self.listRecommendationResources(input, logger: logger)
    }

    /// List a filterable set of Recommendations
    @Sendable
    @inlinable
    public func listRecommendations(_ input: ListRecommendationsRequest, logger: Logger = AWSClient.loggingDisabled) async throws -> ListRecommendationsResponse {
        try await self.client.execute(
            operation: "ListRecommendations", 
            path: "/v1/recommendations", 
            httpMethod: .GET, 
            serviceConfig: self.config, 
            input: input, 
            logger: logger
        )
    }
    /// List a filterable set of Recommendations
    ///
    /// Parameters:
    ///   - afterLastUpdatedAt: After the last update of the Recommendation
    ///   - awsService: The aws service associated with the Recommendation
    ///   - beforeLastUpdatedAt: Before the last update of the Recommendation
    ///   - checkIdentifier: The check identifier of the Recommendation
    ///   - maxResults: The maximum number of results to return per page.
    ///   - nextToken: The token for the next set of results. Use the value returned in the previous response in the next request to retrieve the next set of results.
    ///   - pillar: The pillar of the Recommendation
    ///   - source: The source of the Recommendation
    ///   - status: The status of the Recommendation
    ///   - type: The type of the Recommendation
    ///   - logger: Logger use during operation
    @inlinable
    public func listRecommendations(
        afterLastUpdatedAt: Date? = nil,
        awsService: String? = nil,
        beforeLastUpdatedAt: Date? = nil,
        checkIdentifier: String? = nil,
        maxResults: Int? = nil,
        nextToken: String? = nil,
        pillar: RecommendationPillar? = nil,
        source: RecommendationSource? = nil,
        status: RecommendationStatus? = nil,
        type: RecommendationType? = nil,
        logger: Logger = AWSClient.loggingDisabled        
    ) async throws -> ListRecommendationsResponse {
        let input = ListRecommendationsRequest(
            afterLastUpdatedAt: afterLastUpdatedAt, 
            awsService: awsService, 
            beforeLastUpdatedAt: beforeLastUpdatedAt, 
            checkIdentifier: checkIdentifier, 
            maxResults: maxResults, 
            nextToken: nextToken, 
            pillar: pillar, 
            source: source, 
            status: status, 
            type: type
        )
        return try await self.listRecommendations(input, logger: logger)
    }

    /// Update the lifecycle of a Recommendation within an Organization. This API only supports prioritized recommendations.
    @Sendable
    @inlinable
    public func updateOrganizationRecommendationLifecycle(_ input: UpdateOrganizationRecommendationLifecycleRequest, logger: Logger = AWSClient.loggingDisabled) async throws {
        try await self.client.execute(
            operation: "UpdateOrganizationRecommendationLifecycle", 
            path: "/v1/organization-recommendations/{organizationRecommendationIdentifier}/lifecycle", 
            httpMethod: .PUT, 
            serviceConfig: self.config, 
            input: input, 
            logger: logger
        )
    }
    /// Update the lifecycle of a Recommendation within an Organization. This API only supports prioritized recommendations.
    ///
    /// Parameters:
    ///   - lifecycleStage: The new lifecycle stage
    ///   - organizationRecommendationIdentifier: The Recommendation identifier for AWS Trusted Advisor Priority recommendations
    ///   - updateReason: Reason for the lifecycle stage change
    ///   - updateReasonCode: Reason code for the lifecycle state change
    ///   - logger: Logger use during operation
    @inlinable
    public func updateOrganizationRecommendationLifecycle(
        lifecycleStage: UpdateRecommendationLifecycleStage,
        organizationRecommendationIdentifier: String,
        updateReason: String? = nil,
        updateReasonCode: UpdateRecommendationLifecycleStageReasonCode? = nil,
        logger: Logger = AWSClient.loggingDisabled        
    ) async throws {
        let input = UpdateOrganizationRecommendationLifecycleRequest(
            lifecycleStage: lifecycleStage, 
            organizationRecommendationIdentifier: organizationRecommendationIdentifier, 
            updateReason: updateReason, 
            updateReasonCode: updateReasonCode
        )
        return try await self.updateOrganizationRecommendationLifecycle(input, logger: logger)
    }

    /// Update the lifecyle of a Recommendation. This API only supports prioritized recommendations.
    @Sendable
    @inlinable
    public func updateRecommendationLifecycle(_ input: UpdateRecommendationLifecycleRequest, logger: Logger = AWSClient.loggingDisabled) async throws {
        try await self.client.execute(
            operation: "UpdateRecommendationLifecycle", 
            path: "/v1/recommendations/{recommendationIdentifier}/lifecycle", 
            httpMethod: .PUT, 
            serviceConfig: self.config, 
            input: input, 
            logger: logger
        )
    }
    /// Update the lifecyle of a Recommendation. This API only supports prioritized recommendations.
    ///
    /// Parameters:
    ///   - lifecycleStage: The new lifecycle stage
    ///   - recommendationIdentifier: The Recommendation identifier for AWS Trusted Advisor Priority recommendations
    ///   - updateReason: Reason for the lifecycle stage change
    ///   - updateReasonCode: Reason code for the lifecycle state change
    ///   - logger: Logger use during operation
    @inlinable
    public func updateRecommendationLifecycle(
        lifecycleStage: UpdateRecommendationLifecycleStage,
        recommendationIdentifier: String,
        updateReason: String? = nil,
        updateReasonCode: UpdateRecommendationLifecycleStageReasonCode? = nil,
        logger: Logger = AWSClient.loggingDisabled        
    ) async throws {
        let input = UpdateRecommendationLifecycleRequest(
            lifecycleStage: lifecycleStage, 
            recommendationIdentifier: recommendationIdentifier, 
            updateReason: updateReason, 
            updateReasonCode: updateReasonCode
        )
        return try await self.updateRecommendationLifecycle(input, logger: logger)
    }
}

extension TrustedAdvisor {
    /// Initializer required by `AWSService.with(middlewares:timeout:byteBufferAllocator:options)`. You are not able to use this initializer directly as there are not public
    /// initializers for `AWSServiceConfig.Patch`. Please use `AWSService.with(middlewares:timeout:byteBufferAllocator:options)` instead.
    public init(from: TrustedAdvisor, patch: AWSServiceConfig.Patch) {
        self.client = from.client
        self.config = from.config.with(patch: patch)
    }
}

// MARK: Paginators

@available(macOS 10.15, iOS 13.0, tvOS 13.0, watchOS 6.0, *)
extension TrustedAdvisor {
    /// Return PaginatorSequence for operation ``listChecks(_:logger:)``.
    ///
    /// - Parameters:
    ///   - input: Input for operation
    ///   - logger: Logger used for logging
    @inlinable
    public func listChecksPaginator(
        _ input: ListChecksRequest,
        logger: Logger = AWSClient.loggingDisabled
    ) -> AWSClient.PaginatorSequence<ListChecksRequest, ListChecksResponse> {
        return .init(
            input: input,
            command: self.listChecks,
            inputKey: \ListChecksRequest.nextToken,
            outputKey: \ListChecksResponse.nextToken,
            logger: logger
        )
    }
    /// Return PaginatorSequence for operation ``listChecks(_:logger:)``.
    ///
    /// - Parameters:
    ///   - awsService: The aws service associated with the check
    ///   - language: The ISO 639-1 code for the language that you want your checks to appear in.
    ///   - maxResults: The maximum number of results to return per page.
    ///   - pillar: The pillar of the check
    ///   - source: The source of the check
    ///   - logger: Logger used for logging
    @inlinable
    public func listChecksPaginator(
        awsService: String? = nil,
        language: RecommendationLanguage? = nil,
        maxResults: Int? = nil,
        pillar: RecommendationPillar? = nil,
        source: RecommendationSource? = nil,
        logger: Logger = AWSClient.loggingDisabled        
    ) -> AWSClient.PaginatorSequence<ListChecksRequest, ListChecksResponse> {
        let input = ListChecksRequest(
            awsService: awsService, 
            language: language, 
            maxResults: maxResults, 
            pillar: pillar, 
            source: source
        )
        return self.listChecksPaginator(input, logger: logger)
    }

    /// Return PaginatorSequence for operation ``listOrganizationRecommendationAccounts(_:logger:)``.
    ///
    /// - Parameters:
    ///   - input: Input for operation
    ///   - logger: Logger used for logging
    @inlinable
    public func listOrganizationRecommendationAccountsPaginator(
        _ input: ListOrganizationRecommendationAccountsRequest,
        logger: Logger = AWSClient.loggingDisabled
    ) -> AWSClient.PaginatorSequence<ListOrganizationRecommendationAccountsRequest, ListOrganizationRecommendationAccountsResponse> {
        return .init(
            input: input,
            command: self.listOrganizationRecommendationAccounts,
            inputKey: \ListOrganizationRecommendationAccountsRequest.nextToken,
            outputKey: \ListOrganizationRecommendationAccountsResponse.nextToken,
            logger: logger
        )
    }
    /// Return PaginatorSequence for operation ``listOrganizationRecommendationAccounts(_:logger:)``.
    ///
    /// - Parameters:
    ///   - affectedAccountId: An account affected by this organization recommendation
    ///   - maxResults: The maximum number of results to return per page.
    ///   - organizationRecommendationIdentifier: The Recommendation identifier
    ///   - logger: Logger used for logging
    @inlinable
    public func listOrganizationRecommendationAccountsPaginator(
        affectedAccountId: String? = nil,
        maxResults: Int? = nil,
        organizationRecommendationIdentifier: String,
        logger: Logger = AWSClient.loggingDisabled        
    ) -> AWSClient.PaginatorSequence<ListOrganizationRecommendationAccountsRequest, ListOrganizationRecommendationAccountsResponse> {
        let input = ListOrganizationRecommendationAccountsRequest(
            affectedAccountId: affectedAccountId, 
            maxResults: maxResults, 
            organizationRecommendationIdentifier: organizationRecommendationIdentifier
        )
        return self.listOrganizationRecommendationAccountsPaginator(input, logger: logger)
    }

    /// Return PaginatorSequence for operation ``listOrganizationRecommendationResources(_:logger:)``.
    ///
    /// - Parameters:
    ///   - input: Input for operation
    ///   - logger: Logger used for logging
    @inlinable
    public func listOrganizationRecommendationResourcesPaginator(
        _ input: ListOrganizationRecommendationResourcesRequest,
        logger: Logger = AWSClient.loggingDisabled
    ) -> AWSClient.PaginatorSequence<ListOrganizationRecommendationResourcesRequest, ListOrganizationRecommendationResourcesResponse> {
        return .init(
            input: input,
            command: self.listOrganizationRecommendationResources,
            inputKey: \ListOrganizationRecommendationResourcesRequest.nextToken,
            outputKey: \ListOrganizationRecommendationResourcesResponse.nextToken,
            logger: logger
        )
    }
    /// Return PaginatorSequence for operation ``listOrganizationRecommendationResources(_:logger:)``.
    ///
    /// - Parameters:
    ///   - affectedAccountId: An account affected by this organization recommendation
    ///   - exclusionStatus: The exclusion status of the resource
    ///   - maxResults: The maximum number of results to return per page.
    ///   - organizationRecommendationIdentifier: The AWS Organization organization's Recommendation identifier
    ///   - regionCode: The AWS Region code of the resource
    ///   - status: The status of the resource
    ///   - logger: Logger used for logging
    @inlinable
    public func listOrganizationRecommendationResourcesPaginator(
        affectedAccountId: String? = nil,
        exclusionStatus: ExclusionStatus? = nil,
        maxResults: Int? = nil,
        organizationRecommendationIdentifier: String,
        regionCode: String? = nil,
        status: ResourceStatus? = nil,
        logger: Logger = AWSClient.loggingDisabled        
    ) -> AWSClient.PaginatorSequence<ListOrganizationRecommendationResourcesRequest, ListOrganizationRecommendationResourcesResponse> {
        let input = ListOrganizationRecommendationResourcesRequest(
            affectedAccountId: affectedAccountId, 
            exclusionStatus: exclusionStatus, 
            maxResults: maxResults, 
            organizationRecommendationIdentifier: organizationRecommendationIdentifier, 
            regionCode: regionCode, 
            status: status
        )
        return self.listOrganizationRecommendationResourcesPaginator(input, logger: logger)
    }

    /// Return PaginatorSequence for operation ``listOrganizationRecommendations(_:logger:)``.
    ///
    /// - Parameters:
    ///   - input: Input for operation
    ///   - logger: Logger used for logging
    @inlinable
    public func listOrganizationRecommendationsPaginator(
        _ input: ListOrganizationRecommendationsRequest,
        logger: Logger = AWSClient.loggingDisabled
    ) -> AWSClient.PaginatorSequence<ListOrganizationRecommendationsRequest, ListOrganizationRecommendationsResponse> {
        return .init(
            input: input,
            command: self.listOrganizationRecommendations,
            inputKey: \ListOrganizationRecommendationsRequest.nextToken,
            outputKey: \ListOrganizationRecommendationsResponse.nextToken,
            logger: logger
        )
    }
    /// Return PaginatorSequence for operation ``listOrganizationRecommendations(_:logger:)``.
    ///
    /// - Parameters:
    ///   - afterLastUpdatedAt: After the last update of the Recommendation
    ///   - awsService: The aws service associated with the Recommendation
    ///   - beforeLastUpdatedAt: Before the last update of the Recommendation
    ///   - checkIdentifier: The check identifier of the Recommendation
    ///   - maxResults: The maximum number of results to return per page.
    ///   - pillar: The pillar of the Recommendation
    ///   - source: The source of the Recommendation
    ///   - status: The status of the Recommendation
    ///   - type: The type of the Recommendation
    ///   - logger: Logger used for logging
    @inlinable
    public func listOrganizationRecommendationsPaginator(
        afterLastUpdatedAt: Date? = nil,
        awsService: String? = nil,
        beforeLastUpdatedAt: Date? = nil,
        checkIdentifier: String? = nil,
        maxResults: Int? = nil,
        pillar: RecommendationPillar? = nil,
        source: RecommendationSource? = nil,
        status: RecommendationStatus? = nil,
        type: RecommendationType? = nil,
        logger: Logger = AWSClient.loggingDisabled        
    ) -> AWSClient.PaginatorSequence<ListOrganizationRecommendationsRequest, ListOrganizationRecommendationsResponse> {
        let input = ListOrganizationRecommendationsRequest(
            afterLastUpdatedAt: afterLastUpdatedAt, 
            awsService: awsService, 
            beforeLastUpdatedAt: beforeLastUpdatedAt, 
            checkIdentifier: checkIdentifier, 
            maxResults: maxResults, 
            pillar: pillar, 
            source: source, 
            status: status, 
            type: type
        )
        return self.listOrganizationRecommendationsPaginator(input, logger: logger)
    }

    /// Return PaginatorSequence for operation ``listRecommendationResources(_:logger:)``.
    ///
    /// - Parameters:
    ///   - input: Input for operation
    ///   - logger: Logger used for logging
    @inlinable
    public func listRecommendationResourcesPaginator(
        _ input: ListRecommendationResourcesRequest,
        logger: Logger = AWSClient.loggingDisabled
    ) -> AWSClient.PaginatorSequence<ListRecommendationResourcesRequest, ListRecommendationResourcesResponse> {
        return .init(
            input: input,
            command: self.listRecommendationResources,
            inputKey: \ListRecommendationResourcesRequest.nextToken,
            outputKey: \ListRecommendationResourcesResponse.nextToken,
            logger: logger
        )
    }
    /// Return PaginatorSequence for operation ``listRecommendationResources(_:logger:)``.
    ///
    /// - Parameters:
    ///   - exclusionStatus: The exclusion status of the resource
    ///   - maxResults: The maximum number of results to return per page.
    ///   - recommendationIdentifier: The Recommendation identifier
    ///   - regionCode: The AWS Region code of the resource
    ///   - status: The status of the resource
    ///   - logger: Logger used for logging
    @inlinable
    public func listRecommendationResourcesPaginator(
        exclusionStatus: ExclusionStatus? = nil,
        maxResults: Int? = nil,
        recommendationIdentifier: String,
        regionCode: String? = nil,
        status: ResourceStatus? = nil,
        logger: Logger = AWSClient.loggingDisabled        
    ) -> AWSClient.PaginatorSequence<ListRecommendationResourcesRequest, ListRecommendationResourcesResponse> {
        let input = ListRecommendationResourcesRequest(
            exclusionStatus: exclusionStatus, 
            maxResults: maxResults, 
            recommendationIdentifier: recommendationIdentifier, 
            regionCode: regionCode, 
            status: status
        )
        return self.listRecommendationResourcesPaginator(input, logger: logger)
    }

    /// Return PaginatorSequence for operation ``listRecommendations(_:logger:)``.
    ///
    /// - Parameters:
    ///   - input: Input for operation
    ///   - logger: Logger used for logging
    @inlinable
    public func listRecommendationsPaginator(
        _ input: ListRecommendationsRequest,
        logger: Logger = AWSClient.loggingDisabled
    ) -> AWSClient.PaginatorSequence<ListRecommendationsRequest, ListRecommendationsResponse> {
        return .init(
            input: input,
            command: self.listRecommendations,
            inputKey: \ListRecommendationsRequest.nextToken,
            outputKey: \ListRecommendationsResponse.nextToken,
            logger: logger
        )
    }
    /// Return PaginatorSequence for operation ``listRecommendations(_:logger:)``.
    ///
    /// - Parameters:
    ///   - afterLastUpdatedAt: After the last update of the Recommendation
    ///   - awsService: The aws service associated with the Recommendation
    ///   - beforeLastUpdatedAt: Before the last update of the Recommendation
    ///   - checkIdentifier: The check identifier of the Recommendation
    ///   - maxResults: The maximum number of results to return per page.
    ///   - pillar: The pillar of the Recommendation
    ///   - source: The source of the Recommendation
    ///   - status: The status of the Recommendation
    ///   - type: The type of the Recommendation
    ///   - logger: Logger used for logging
    @inlinable
    public func listRecommendationsPaginator(
        afterLastUpdatedAt: Date? = nil,
        awsService: String? = nil,
        beforeLastUpdatedAt: Date? = nil,
        checkIdentifier: String? = nil,
        maxResults: Int? = nil,
        pillar: RecommendationPillar? = nil,
        source: RecommendationSource? = nil,
        status: RecommendationStatus? = nil,
        type: RecommendationType? = nil,
        logger: Logger = AWSClient.loggingDisabled        
    ) -> AWSClient.PaginatorSequence<ListRecommendationsRequest, ListRecommendationsResponse> {
        let input = ListRecommendationsRequest(
            afterLastUpdatedAt: afterLastUpdatedAt, 
            awsService: awsService, 
            beforeLastUpdatedAt: beforeLastUpdatedAt, 
            checkIdentifier: checkIdentifier, 
            maxResults: maxResults, 
            pillar: pillar, 
            source: source, 
            status: status, 
            type: type
        )
        return self.listRecommendationsPaginator(input, logger: logger)
    }
}

extension TrustedAdvisor.ListChecksRequest: AWSPaginateToken {
    @inlinable
    public func usingPaginationToken(_ token: String) -> TrustedAdvisor.ListChecksRequest {
        return .init(
            awsService: self.awsService,
            language: self.language,
            maxResults: self.maxResults,
            nextToken: token,
            pillar: self.pillar,
            source: self.source
        )
    }
}

extension TrustedAdvisor.ListOrganizationRecommendationAccountsRequest: AWSPaginateToken {
    @inlinable
    public func usingPaginationToken(_ token: String) -> TrustedAdvisor.ListOrganizationRecommendationAccountsRequest {
        return .init(
            affectedAccountId: self.affectedAccountId,
            maxResults: self.maxResults,
            nextToken: token,
            organizationRecommendationIdentifier: self.organizationRecommendationIdentifier
        )
    }
}

extension TrustedAdvisor.ListOrganizationRecommendationResourcesRequest: AWSPaginateToken {
    @inlinable
    public func usingPaginationToken(_ token: String) -> TrustedAdvisor.ListOrganizationRecommendationResourcesRequest {
        return .init(
            affectedAccountId: self.affectedAccountId,
            exclusionStatus: self.exclusionStatus,
            maxResults: self.maxResults,
            nextToken: token,
            organizationRecommendationIdentifier: self.organizationRecommendationIdentifier,
            regionCode: self.regionCode,
            status: self.status
        )
    }
}

extension TrustedAdvisor.ListOrganizationRecommendationsRequest: AWSPaginateToken {
    @inlinable
    public func usingPaginationToken(_ token: String) -> TrustedAdvisor.ListOrganizationRecommendationsRequest {
        return .init(
            afterLastUpdatedAt: self.afterLastUpdatedAt,
            awsService: self.awsService,
            beforeLastUpdatedAt: self.beforeLastUpdatedAt,
            checkIdentifier: self.checkIdentifier,
            maxResults: self.maxResults,
            nextToken: token,
            pillar: self.pillar,
            source: self.source,
            status: self.status,
            type: self.type
        )
    }
}

extension TrustedAdvisor.ListRecommendationResourcesRequest: AWSPaginateToken {
    @inlinable
    public func usingPaginationToken(_ token: String) -> TrustedAdvisor.ListRecommendationResourcesRequest {
        return .init(
            exclusionStatus: self.exclusionStatus,
            maxResults: self.maxResults,
            nextToken: token,
            recommendationIdentifier: self.recommendationIdentifier,
            regionCode: self.regionCode,
            status: self.status
        )
    }
}

extension TrustedAdvisor.ListRecommendationsRequest: AWSPaginateToken {
    @inlinable
    public func usingPaginationToken(_ token: String) -> TrustedAdvisor.ListRecommendationsRequest {
        return .init(
            afterLastUpdatedAt: self.afterLastUpdatedAt,
            awsService: self.awsService,
            beforeLastUpdatedAt: self.beforeLastUpdatedAt,
            checkIdentifier: self.checkIdentifier,
            maxResults: self.maxResults,
            nextToken: token,
            pillar: self.pillar,
            source: self.source,
            status: self.status,
            type: self.type
        )
    }
}
